From bacb6be3ce2418e41d0509b61842f03dbea8683c Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Sat, 19 Sep 2015 23:47:53 -0400 Subject: [PATCH] Fixing typos and grammar in comments --- src/cargo/core/package.rs | 4 ++-- src/cargo/core/registry.rs | 10 +++++----- src/cargo/ops/cargo_clean.rs | 2 +- src/cargo/ops/cargo_compile.rs | 2 +- src/cargo/ops/cargo_package.rs | 6 +++--- src/cargo/ops/resolve.rs | 4 ++-- src/cargo/sources/path.rs | 8 ++++---- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/cargo/core/package.rs b/src/cargo/core/package.rs index f71f5025e..317c5cf35 100644 --- a/src/cargo/core/package.rs +++ b/src/cargo/core/package.rs @@ -10,9 +10,9 @@ use util::{CargoResult, graph}; use rustc_serialize::{Encoder,Encodable}; use core::source::Source; -/// Informations about a package that is available somewhere in the file system. +/// Information about a package that is available somewhere in the file system. /// -/// A package is a `Cargo.toml` file, plus all the files that are part of it. +/// A package is a `Cargo.toml` file plus all the files that are part of it. // TODO: Is manifest_path a relic? #[derive(Clone, Debug)] pub struct Package { diff --git a/src/cargo/core/registry.rs b/src/cargo/core/registry.rs index 273bb5ed5..94a484c63 100644 --- a/src/cargo/core/registry.rs +++ b/src/cargo/core/registry.rs @@ -4,7 +4,7 @@ use std::collections::hash_map::HashMap; use core::{Source, SourceId, SourceMap, Summary, Dependency, PackageId, Package}; use util::{CargoResult, ChainError, Config, human, profile}; -/// Source of informations about a group of packages. +/// Source of information about a group of packages. /// /// See also `core::Source`. pub trait Registry { @@ -32,11 +32,11 @@ impl Registry for Vec { /// /// The resolution phase of Cargo uses this to drive knowledge about new /// packages as well as querying for lists of new packages. It is here that -/// sources are updated and (e.g. network operations) as well as overrides are +/// sources are updated (e.g. network operations) and overrides are /// handled. /// /// The general idea behind this registry is that it is centered around the -/// `SourceMap` structure contained within which is a mapping of a `SourceId` to +/// `SourceMap` structure, contained within which is a mapping of a `SourceId` to /// a `Source`. Each `Source` in the map has been updated (using network /// operations if necessary) and is ready to be queried for packages. pub struct PackageRegistry<'cfg> { @@ -213,7 +213,7 @@ impl<'cfg> PackageRegistry<'cfg> { // possible. This is where the concept of a lockfile comes into play. // // If a summary points at a package id which was previously locked, then we - // override the summary's id itself as well as all dependencies to be + // override the summary's id itself, as well as all dependencies, to be // rewritten to the locked versions. This will transform the summary's // source to a precise source (listed in the locked version) as well as // transforming all of the dependencies from range requirements on imprecise @@ -242,7 +242,7 @@ impl<'cfg> PackageRegistry<'cfg> { // one of a few cases can arise: // // 1. We have a lock entry for this dependency from the same - // source as its listed as coming from. In this case we make + // source as it's listed as coming from. In this case we make // sure to lock to precisely the given package id. // // 2. We have a lock entry for this dependency, but it's from a diff --git a/src/cargo/ops/cargo_clean.rs b/src/cargo/ops/cargo_clean.rs index 03b057555..2c1818667 100644 --- a/src/cargo/ops/cargo_clean.rs +++ b/src/cargo/ops/cargo_clean.rs @@ -23,7 +23,7 @@ pub fn clean(manifest_path: &Path, opts: &CleanOptions) -> CargoResult<()> { let root = try!(src.root_package()); let target_dir = opts.config.target_dir(&root); - // If we have a spec, then we need to delete some package,s otherwise, just + // If we have a spec, then we need to delete some packages, otherwise, just // remove the whole target directory and be done with it! let spec = match opts.spec { Some(spec) => spec, diff --git a/src/cargo/ops/cargo_compile.rs b/src/cargo/ops/cargo_compile.rs index 74d0b0942..bcab99841 100644 --- a/src/cargo/ops/cargo_compile.rs +++ b/src/cargo/ops/cargo_compile.rs @@ -36,7 +36,7 @@ use sources::{PathSource}; use util::config::{ConfigValue, Config}; use util::{CargoResult, internal, human, ChainError, profile}; -/// Contains informations about how a package should be compiled. +/// Contains information about how a package should be compiled. pub struct CompileOptions<'a> { pub config: &'a Config, /// Number of concurrent jobs to use. diff --git a/src/cargo/ops/cargo_package.rs b/src/cargo/ops/cargo_package.rs index bcd74f460..b198c1555 100644 --- a/src/cargo/ops/cargo_package.rs +++ b/src/cargo/ops/cargo_package.rs @@ -162,10 +162,10 @@ fn run_verify(config: &Config, pkg: &Package, tar: &Path) // implicitly converted to registry-based dependencies, so we rewrite those // dependencies here. // - // We also be sure to point all paths at `dst` instead of the previous - // location that the package was original read from. In locking the + // We also make sure to point all paths at `dst` instead of the previous + // location that the package was originally read from. In locking the // `SourceId` we're telling it that the corresponding `PathSource` will be - // considered updated and won't actually read any packages. + // considered updated and we won't actually read any packages. let registry = try!(SourceId::for_central(config)); let precise = Some("locked".to_string()); let new_src = try!(SourceId::for_path(&dst)).with_precise(precise); diff --git a/src/cargo/ops/resolve.rs b/src/cargo/ops/resolve.rs index 7f17321bd..9b23fed34 100644 --- a/src/cargo/ops/resolve.rs +++ b/src/cargo/ops/resolve.rs @@ -9,7 +9,7 @@ use util::CargoResult; /// Resolve all dependencies for the specified `package` using the previous /// lockfile as a guide if present. /// -/// This function will also generate a write the result of resolution as a new +/// This function will also write the result of resolution as a new /// lockfile. pub fn resolve_pkg(registry: &mut PackageRegistry, package: &Package) -> CargoResult { @@ -73,7 +73,7 @@ pub fn resolve_with_previous<'a>(registry: &mut PackageRegistry, // 2. The specified package's summary will have its dependencies // modified to their precise variants. This will instruct the // first step of the resolution process to not query for ranges - // but rather precise dependency versions. + // but rather for precise dependency versions. // // This process must handle altered dependencies, however, as // it's possible for a manifest to change over time to have diff --git a/src/cargo/sources/path.rs b/src/cargo/sources/path.rs index 0bca3de26..d84aed395 100644 --- a/src/cargo/sources/path.rs +++ b/src/cargo/sources/path.rs @@ -79,7 +79,7 @@ impl<'cfg> PathSource<'cfg> { /// List all files relevant to building this package inside this source. /// - /// This function will use the appropriate methods to determine what is the + /// This function will use the appropriate methods to determine the /// set of files underneath this source's directory which are relevant for /// building `pkg`. /// @@ -115,7 +115,7 @@ impl<'cfg> PathSource<'cfg> { // We check all packages in this source that are ancestors of the // specified package (including the same package) to see if they're at // the root of the git repository. This isn't always true, but it'll get - // us there most of the time!. + // us there most of the time! let repo = self.packages.iter() .map(|pkg| pkg.root()) .filter(|path| root.starts_with(path)) @@ -139,11 +139,11 @@ impl<'cfg> PathSource<'cfg> { let mut ret = Vec::new(); - // We use information from the git repository to guide use in traversing + // We use information from the git repository to guide us in traversing // its tree. The primary purpose of this is to take advantage of the // .gitignore and auto-ignore files that don't matter. // - // Here we're also careful to look at both tracked an untracked files as + // Here we're also careful to look at both tracked and untracked files as // the untracked files are often part of a build and may become relevant // as part of a future commit. let index_files = index.iter().map(|entry| { -- 2.30.2